#!/sbin/openrc-run

name=$RC_SVCNAME
command="/usr/bin/prosody-filer"
command_args="-config ${PROSODY_FILER_CONF}"
command_user="${PROSODY_FILER_USER}:${PROSODY_FILER_GROUP}"
pidfile="/run/$RC_SVCNAME.pid"
command_background=yes

depend() {
	need net
}

start_pre() {
    if [ ! -e "${PROSODY_FILER_CONF}" ]; then
        eerror "You must create a config file to run prosody-filer"
        return 1
    fi
}
